<?php
/**
 *  view: friends home page
 *  File: friends/home.php
 */
if( isset($user) )
  //$user_name = ( $user->name!="" )?$user->name:$user->username;
  $user_name = $user->username;
else
  $user_name = "";
?>

<div id="f_main">
 	<div class="f_container">
    
    <h3>
      <?php
      if( true == $user->is_online)
        echo "<span class='online' title='Online'></span>";
      else
        echo "<span class='offline' title='Offline'></span>";
      ?>
      <?php echo $user_name; ?> (<?php echo $user->age; ?>)
    </h3>
    <div class="block-left">
      
    	<?php if( NULL != $main_image ){ ?>
    	<img class="profil" src="<?php echo base_url(); ?>profile/image/small/<?php if(isset($user)) echo $user->id .'/'. $main_image; ?>" alt="<?php echo $user_name; ?>" />
        <?php } else { ?>
        <img class="profil" src="<?php echo base_url(); ?>img/no_image.gif" alt="" />
        <?php } ?>
        
        
        <p><a class="link-edit" href="<?php echo base_url(); ?>profile/edit-photo.htm"><?php echo lang('edit_profile_picture'); ?></a></p>
        <div class="baloon"></div>
        <div class="about-me">
        <p><span><?php echo lang('flirtyy_profile_text'); ?> </span><?php if(isset($user)) echo $user->flirt_text; ?></p>
        </div>
    </div><!--end block-left-->
    <div class="block">
    	
        <h4><?php echo lang('my_friends'); ?> (<a id="num_friends"><?php echo count($friends); ?></a>)</h4>
        <div class="search-friend">
        <input name="" id="input_search_friend" type="text" placeholder="<?php echo lang('search_by_name'); ?>...">
           <input class="save" name="" id="search_friend" type="button" value="<?php echo lang('search'); ?>">
        </div><!--end search-friend-->
        <div id='friends_list'>
        <?php  
        
        $this->load->view('friends/part/friends_list');
        
        ?>
        </div>
        <div id="response"></div>
               
    </div><!--end block-->
    <div class="block-right">
    	<div class="side-module">
        
              <?php $this->load->view('modules/my_favorites'); ?>
          
        </div><!--End side-module-->
        <div class="basic-module">
          
              <?php $this->load->view('modules/whos_viewed_your_profile');  ?>
          
        </div><!--End basic-module-->
        <div class="side-module" id="my_friends">
          
              <?php $this->load->view('modules/my_friends');  ?>
          
        </div><!--End side-module-->
    </div><!--end block-right-->
    </div><!--end f_container-->
 </div><!--end f_main-->
 



